1. Field of the Invention
The present invention relates to a key signal generating apparatus for digital chromakey system.
2. Description of the Prior Art
FIG. 1 is a block diagram showing an overall arrangement of a digital chromakey apparatus to which this invention is applicable. In the figure, reference 1 denotes an interface to which a foreground color video data signal FG. VID and a background color video data signal BG. VID each being associated with a timing reference signal TRS are supplied. The above color video data signals FG. VID and BG. VID are formed of respective components provided by sampling a luminance signal Y and color difference signals U and V, each of which is formed by matrix calculation of output signals R, G and B from a color television camera, at the sampling frequency ratio of, for instance, 14:7:7. The interface 1 takes the timing signals (horizontal sync. signal, vertical sync. signal and the like) decoded from the respective timing reference signals TRS into consideration, then makes the phases of two colors video data signals FG. VID and BG. VID appropriate ones, and then delivers the same to the next stage.
Reference 2 denotes a back color data generator which forms a back color data signal from the foreground color video data signal FG. VID and supplies the same to a key signal generator 3 and a color canceller 5.
The key signal generator 3 compares the back color data signal with the foreground color video data signal FG. VID at every corresponding sample thereof to allow the generation of a key signal with a predetermined level. Since the key signal per se thus developed has so many external disturbances, it can not be utilized as it is. Therefore, as will be discussed later, the key signal is supplied to a key processor 4, whereby it is subjected to waveform shaping processes such as clipping, adjustment of edge timings of this clipped output, adjustment of gain and the like. Thus the key processor 4 produces a key signal KEY.
The color canceller 5 eliminates the back color data from the foreground color video data signal FG. VID on the basis of the above key signal KEY. For instance, when an object 14 (FIGS. 3A to 3D) is transparent, the transparent back color is removed. To be more concrete, the back color data is amplitude-modulated by the key signal KEY so as to subtract the modulated output from the foreground color video data signal FG. VID. The elimination of the back color is intended for only the color difference signals U and V, while the luminance signal Y is merely passed through the color canceller 5.
The color canceller 5 is supplied with the foreground color video data signal FG. VID by way of a delay circuit 6. The delay circuit 6 has a delay time corresponding to the time needed by the key processor 4 in its waveform shaping processes mentioned before.
An output CAN. VID of the color canceller 5 and the background color video data signal BG. VID are supplied to a mixer 7, in which they are mixed on the basis of the key signal KEY applied thereto. Other than a method for simply switching two color video data signals CAN. VID and BG. VID to each other, the above mixing operation can use a so-called cross fade method in which at the boundary between the data, the level of one data is gradually decreased, while the level of the other data is gradualy increased in a direction transverse with respect to the boundary. The output of the mixer 7 is supplied through a digital filter 8 to an interface 9. The digital filter 8 serves to shape the waveform of the output derived from the mixer 7.
The interface 9 permits the color video data signal CAN. VID, the colors of which are removed and derived from the color canceller 5, the mixed color video data signal KYD. VID from the digital filter 8, the respective timing reference signals TRS and the key signal KEY to be developed to the outside.
In addition, the microprocessor 10, a CRT (cathode ray tube) monitor 11 and a console 12 are provided, in which the translation of a user key input from the console 12, the transfer of the above translation into the inside of the system, the calculation processings required by respective circuit blocks and the like are possible.
The aforesaid digital chromakey apparatus operates at a sampling clock frequency corresponding to the sampling rate of the color difference data.
FIG. 2 shows in block the principle of the color canceller 5 and mixer 7 using the key signal KEY. Taking the key signal KEY shown in FIG. 5B as an example, the key signal KEY is converted to a key signal KEY' shown in FIG. 5C. This key signal KEY' is supplied to a multiplier 17 so as to modulate the back color signal DB derived from the back color data generator 2 (FIG. 1). The output of the multiplier 17 is supplied to a subtractor 18 thereby subtracted from the foreground color video data signal FG. VID. Thus the subtractor 18 derives the video data signal CAN. VID from the color video data signal FG. VID from which have been removed the data which corresponds with the object 14 and the back color of the object 14. The aforesaid operations are all performed by the color canceller 5 in FIG. 1.
Moreover, in a multiplier 19 the video data signal CAN. VID is modulated by the key signal KEY and in a multiplier 20 the background video data signal BG. VID is modulated by the key signal KEY'. Then, the outputs of the both the multipliers 19 and 20 are added to each other in an adder 21. The output video data KYD. VID of the adder 21 affects the picture so that the background picture becomes transparent when the object 14 is transparent as described previously. Owing to the slope of the edge of the key signal KEY, at the boundary between the object 14 and the background 16, the cross fade is performed to incur the gradual switchings of the pictures from one to another thus rendering the boundary of the pictures quite natural.
A conventional method for generating a key signal will be described with reference to FIG. 4. If a reference point corresponding to a back color is taken as (U.sub.0, V.sub.0) in an U-V chroma signal coordinate in FIG. 4, the axis connecting an origin or original point with such reference point is made as an axis x and an axis perpendicular to the axis x and passing through the reference point (U.sub.0, V.sub.0) is made as an axis y. If components X and Y of a vector formed by connecting the reference point (U.sub.0, V.sub.0) and a desired point U, V which components relate to the axes x and y, x and y are expressed as EQU x=(U-U.sub.0) cos .theta.+(V-V.sub.0) sin .theta. EQU y=(V-V.sub.0) cos .theta.-(U-U.sub.0) sin .theta.
where .theta.=tan.sup.-1 (V.sub.0 /U.sub.0).
Therefore it is a conventional method to define a key signal by a function expressed as in the following equation. EQU K=a.vertline.x.vertline.+b.vertline.y.vertline.
(a and b are desired positive constants).
If K in the left is given as a constant value K.sub.0, a value of the desired point U and V to satisfy the value is arranged on the sides of a lozenge.
The soft keying operation will be described briefly with reference to FIGS. 5A through 5C. When the foreground 15 where the object 14 of, for example, the transparent, as glass is put in front of the back screen 13 is picked up, the back color is seen through the center of the glass so that as shown in FIG. 5A, a signal K whose level is increased in association with the outline of the object 14 and is reduced at the center of the glass is derived from the key signal generator 3. Although FIGS. 5A thrugh 5C represent conveniently the key signal as the analog waveform for the sake of the explanation, the key signal is digital data since the aforesaid digital chromakey apparatus in fact deals with the data in which one sample of 8 bits that can provide 255 different gradations, points, is sequentially arrayed at each sampling period. Whereas, the clipper (not shown) excutes the clipping operation which takes base clipping level BL and peak clipping level PL as threshold levels thus generating the soft keying key signal KEY as shown in FIG. 5B.
As stated above, in case of the transparent object 14, the soft keying operation is capable of generation of the key signal corresponding satisfactorily to the back color seen through the transparent object 14 or to the reflected light from the back screen 13 that impinges on the object 14.
By the way, a locus drawn from the reference point (U.sub.0, V.sub.0) to a position corresponding to a color of the object 14 is not generally presented as a straight line. This is mainly due to noise inherently contained in the color video data, and when such data is digitized, quantum noise is added thereto so that a zigzag movement of the aforesaid locus is intensified. Particularly when a direction where apexes of the lozenge in U-V chroma signal coordinates as shown in FIG. 4 are connected, namely, x-axis direction or y-axis direction is coincident with the above locus, the inclined portions or slopes of the key signal are not smoothly varied due to the zigzag movement thereof, resulting in such a problem that a picture quality of the mixed output picture is poor.
Let us assume that as shown in FIG. 6A a level change of six steps exists between the base clip level BL and the peak clip level PL, and the locus drawn along the axis x from the reference point (U.sub.0, V.sub.0) to the position of color of the object. Then, when there is no noise and the locus presents the straight line movement, the slopes of the key signal become a straight line as shown by a broken line in FIG. 6B. But, when as shown in FIG. 6A the locus is drawn as the zigzag line by the noise, the slopes of the key signal are no longer presented as the straight line thus unevenness is produced, as shown by a solid line in FIG. 6B.